package com.cs171.market.controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;

/**
 * @author yangyifei
 * @version 1.0
 * @date 2020/6/21 22:14
 */
@CrossOrigin
@RestController
public class FeeController {

    @PostMapping("fee")
    public Object getFee(){
        final double d = Math.random();
        JSONObject result = new JSONObject();
        result.put("code",200);
        result.put("packPrice",(int)(d*10)+1);
        result.put("deliveryPrice",(int)(d*50)+1);
        return result;
    }
}
